home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000691_evas@cs.few.eur.nl _Fri Feb 26 19:23:28 1993.msg < prev    next >
Internet Message Format  |  1994-01-24  |  3KB

  1. Return-Path: <evas@cs.few.eur.nl>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA24317; Fri, 26 Feb 93 19:23:28 MET
  4. Received: from kaa.cs.few.eur.nl by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA06115; Fri, 26 Feb 1993 19:40:40 +0100
  6. Received: from evas@slc01.cs.few.eur.nl by cs.few.eur.nl (5.67/EUR)
  7.     id AA20833; Fri, 26 Feb 93 19:40:38 +0100
  8. From: Eelco van Asperen <evas@cs.few.eur.nl>
  9. Received: by slc01.cs.few.eur.nl (5.67/EUR/BSD)
  10.     id AA14411; Fri, 26 Feb 93 19:40:33 +0100
  11. Date: Fri, 26 Feb 93 19:40:33 +0100
  12. Message-Id: <9302261840.AA14411@slc01.cs.few.eur.nl>
  13. To: www-talk@nxoc01.cern.ch
  14. Subject: Re: patch to exec from httpd
  15.  
  16. > I seem to remember something about a patch to httpd to allow mapping
  17. > onto a command, rather than a file, but I can't remember where. Am I
  18. > hallucinating, or can someone let me know where this thing is?
  19.  
  20. I have added some code to httpd to allow a filter to be run when 
  21. a file with a certain extension is requested. 
  22. The patches are on ftp.cs.few.eur.nl, file pub/www/Daemon0.9b.patch.
  23. Here's the start of that file;
  24.  
  25. The patches add a generic conversion facility to the HTTP daemon.
  26. The syntax of the httpd.conf file has been extended to include a 
  27. 'convert' entry. Below is a piece of our httpd.conf file:
  28.  
  29.     convert    info        /usr/pkg/www/bin/info2html
  30.     convert    man        /usr/pkg/www/bin/man2html
  31.  
  32. 'info' and 'man' are the file extensions and '/usr/pkg/www/bin/...'
  33. are the filters that should convert the document to HTML.
  34. The filter is called with the document name from the reference
  35. as its only argument.
  36.  
  37. Note that the daemon code has the following extensions hard coded
  38. so they can not be used with this facility:
  39.     .html .rtf .tar .hqx .Z
  40.  
  41. If the daemon has been updated with this code and the filters
  42. have been installed in the right directory, references like
  43. 'http://host/man/csh.man' or 'http://host/info/gcc.info' should
  44. trigger the execution of the appropriate script and convert the
  45. requested document to HTML format.
  46.  
  47. It is handy to create some mappings for the new document types
  48. so references don't depend on the exact location of the documents
  49. in your filesystem;
  50.  
  51.     map    /info/*        /usr/pkg/gnu/info/*
  52.     #
  53.     # map various man-page categories to directories:
  54.     #
  55.     map    /man/gnu/*    /usr/pkg/gnu/man/*
  56.     map    /man/lang/*    /usr/lang/man/*
  57.     map    /man/local/*    /usr/local/man/*
  58.     map    /man/openwin/*    /usr/pkg/openwin3.0/man/*
  59.     map    /man/newsprint/*    /usr/pkg/newsprint1.0/man/*
  60.     map    /man/X/*    /usr/local/X11R5/man/*
  61.     map    /man/*        /usr/man/*
  62.  
  63. The info2html and man2html filters are in the same directory
  64. on our ftp server as this patch (host ftp.cs.few.eur.nl, directory
  65. pub/www).
  66.  
  67. The sample conversion filters are written in Perl so you'll need the
  68. perl program (available from archive sites all over the world);
  69. make sure that the first line of the filters is correct
  70. (/usr/local/bin/perl may not be the location of the perl
  71. binary at your site).
  72.  
  73. Eelco van Asperen.           | Erasmus University Rotterdam
  74. -----------------------------| Department of Computer Science, room H4-32
  75. internet: evas@cs.few.eur.nl | PObox 1738, 3000 DR Rotterdam, The Netherlands
  76. -----------------------------------------------------------------------------
  77.